import RestApi from "@/plugins/api/axios"

class common extends RestApi {
  static get baseUrl() {
    return {
      regsms: `${this.reqBaseUrl}/sign/upload`,
      code: `${this.reqBaseUrl}/sign/code`      
    }
  }
}
const bs = common.baseUrl
export default (ctx:any, inject:any) => {  
  inject('axios', {
    login: {
      get() {
        return common.get(bs.regsms).then(res => {
          console.log(res);          
        })
      },
      post(data:any) {
        return common.post(bs.regsms,data).then(res => {
          console.log(res);          
        })
      }
    },
    code: {
      post(data:any) {
        return common.post(bs.code, data).then(res => {
          console.log(res);          
        })
      }
    }
  })
}